package com.china.school;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class BeansNameSpaceTest {
    public static void main(String[] args) {

        System.setProperty("spring.profiles.active", "prod");

        ApplicationContext ctx = new ClassPathXmlApplicationContext("BeansNameSpaceTest.xml");
        System.out.println(ctx.getBean("userProd"));
        System.out.println(ctx.getBean("user"));
        System.out.println(ctx.getBean("user2"));
        System.out.println(ctx.getBean("user3")); //aliasMap





    }
}
